import java.util.Scanner;
import java.util.Stack;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 强仔
 * Date: 2022-06-05
 * Time: 11:45
 */
public class Main {

    // Fibonacci 数列
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();

        int first = 0;
        int second = 1;
        while(second < n){

            int temp = first;
            first = second;
            second += temp;
        }

        int stape = Math.min( n - first, second - n);
        System.out.println(stape);
    }

    public boolean chkParenthesis(String A, int n) {
        Stack<Character> stack = new Stack<>();
        char[] chars = A.toCharArray();

        for (int i = 0; i < chars.length; i++) {
            if(stack.isEmpty()){
                stack.push(chars[i]);
            }else {
                char ch = stack.peek();
                if(ch == '(' && chars[i] == ')'){
                    stack.pop();
                }else {
                    stack.push(chars[i]);
                }
            }
        }

        return stack.isEmpty();
    }




    public static int getFibo(int n){
        int first = 0;
        int second = 1;
        while(n > 2){
            int temp = first;
            first = second;
            second += temp;
            n--;
        }
        return second;
    }

    public static int F(int n){
        if(n == 0){
            return 0;
        }
        if(n == 1){
            return 1;
        }
        return F(n - 1) + F(n - 2);
    }

    public static void main(String[] args) {
        // 获取Fibonacci 数列的第 n 个数字
        int n = 200;
        System.out.println(getFibo(n));
        System.out.println(F(n - 1));
    }
}
